#!/bin/sh

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later
# Isidro Catalan <skarvin@gmail.com>


# ----------------------------------------------------------------------------
# desc: Network utilities
# author: Isidro Catalan <skarvin@gmail.com>, http://www.opendomo.com
# date: June 2009
#
# CHANGES:
#
# ----------------------------------------------------------------------------
# Common video module vars
. "/etc/opendomo/videoConfVars.conf"


# Check if the URL provided exists or not
checkURL ()
{
   URL="$1"
   # Check whether the URL is valid
   $WGET "$URL" --spider 2> /dev/null > /dev/null
   if [ "$?" != "0" ]; then
      echo "1"
   else
      echo "0"
   fi   
}

